<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:icecore="http://www.icefaces.org/icefaces/core"
	xmlns:ice="http://www.icesoft.com/icefaces/component"
	xmlns:ace="http://www.icefaces.org/icefaces/components">
<h:head>
	<title>inBOtta</title>
	<ice:outputStyle href="../css/woodstock/woodstock.css" rel="stylesheet" type="text/css" />
</h:head>
<h:body>
	<h:form id="gestLuoghi" >

		<ice:outputText value="#{messaggioBean.messaggio}" />

		<ace:pushButton value="Indietro" immediate="true" action="gestione"/>

	<!-- Gestione Luoghi -->
		<ice:portlet>
			<ice:dataTable
                    rows="5"
                    id="luoghi"
                    value="#{gestioneBean.luoghi}"
                    var="luogo">
                    
                  <!-- Id -->
                    <ice:column>
                        <f:facet name="header">
                            <ice:outputText value="Id"/>
                        </f:facet>
						<ice:outputText value="#{luogo.id}" />		
                    </ice:column>               

                    
                    <!-- Tipo -->
                    <ice:column>
                        <f:facet name="header">
                            <ice:outputText value="Tipo"/>
                        </f:facet>
						<ice:outputText value="#{luogo.tipo}"/>	
                    </ice:column>

                    <!--Cat -->
                    <ice:column>
                        <f:facet name="header">
                            <ice:outputText value="Categoria"/>
                        </f:facet>
						<ice:outputText value="#{luogo.categoria}"/>	
                    </ice:column>
                    
                    <!-- Key-->
                    <ice:column>
                        <f:facet name="header">
                            <ice:outputText value="Keywords"/>
                        </f:facet>
						<ice:outputText value="#{luogo.keywords}"/>	
                    </ice:column> 
                    
                    <!-- Indirizzo -->
                    <ice:column>
                        <f:facet name="header">
                            <ice:outputText value="Indirizzo"/>
                        </f:facet>
						<ice:outputText value="#{luogo.indirizzo}"/>	
                    </ice:column>
                   
                    <!-- Nome Luogo -->
                    <ice:column>
                        <f:facet name="header">
                            <ice:outputText value="Nome luogo"/>
                        </f:facet>
						<ice:outputText value="#{luogo.nome}"/>	
                    </ice:column>                   
                                   
                    <!-- Descrbreve -->
                    <ice:column>
                        <f:facet name="header">
                            <ice:outputText value="Desc breve"/>
                        </f:facet>
                        <ice:outputText value="#{luogo.descrizioneBreve}" />	
                    </ice:column>                                   
                                   
                    <!-- Descrizione -->
                    <ice:column>
                        <f:facet name="header">
                            <ice:outputText value="Descrizione"/>
                        </f:facet>
                   		<ice:outputText value="#{luogo.descrizione}"/>	
                    </ice:column>                                                            

                    <!-- Web -->
                    <ice:column>
                        <f:facet name="header">
                            <ice:outputText value="Indirizzo internet"/>
                        </f:facet>
                   		<ice:outputText value="#{luogo.web}"/>	
                    </ice:column> 

                    <!-- Servizi -->
                    <ice:column>
                        <f:facet name="header">
                            <ice:outputText value="Servizi"/>
                        </f:facet>
                   		<ice:outputText value="#{luogo.servizi}"/>	
                    </ice:column> 
                    
                    <!-- Chiusura -->
                    <ice:column>
                        <f:facet name="header">
                            <ice:outputText value="Chiusura"/>
                        </f:facet>
                   		<ice:outputText value="#{luogo.chiusura}"/>	
                    </ice:column> 
                    
                    <!-- Orari -->
                    <ice:column>
                        <f:facet name="header">
                            <ice:outputText value="Orari"/>
                        </f:facet>
                   		<ice:outputText value="#{luogo.orari}"/>	
                    </ice:column> 
                    
                    <!-- Tessera -->
                    <ice:column>
                        <f:facet name="header">
                            <ice:outputText value="Tessera"/>
                        </f:facet>
						<ice:selectBooleanCheckbox disabled="true" value="#{luogo.tessera}"/>	
                    </ice:column> 
                    
                    
                    <!-- Foto -->
                    <ice:column>
                        <f:facet name="header">
                            <ice:outputText value="Foto" />
                        </f:facet>
                        <ice:graphicImage style="height: 80px; width: 140px;" url="../images/luoghi/#{luogo.foto}"/>
                    </ice:column>

                    <ice:column>
                        <f:facet name="header">
                        </f:facet>
					<ace:pushButton  value="Modifica" actionListener="#{gestioneBean.modLuogoListener}" action="modLuogo?faces-redirect=true" ><f:attribute name="luogo"  value="#{luogo}"/></ace:pushButton>
                    </ice:column>  

                    <ice:column>
                        <f:facet name="header">
                        </f:facet>
					<ace:pushButton  value="Cancella" action="#{gestioneBean.doCancLuogo}" actionListener="#{gestioneBean.modLuogoListener}"><f:attribute name="luogo"  value="#{luogo}"/></ace:pushButton>
                    </ice:column>                    
					
			</ice:dataTable>
			
             <!-- Paginator with page controls -->
                <ice:dataPaginator id="dataScroll"
                                   for="luoghi"
                                   paginator="true"
                                   fastStep="1"
                                   paginatorMaxPages="4">

                    <f:facet name="previous">
                        <ice:graphicImage 
                            url="../images/frecciaS.jpg"
                            style="border:none; height: 71px; width: 90px; "
                            title="Pagina Precedente"/>
                    </f:facet>
                    <f:facet name="next">
                        <ice:graphicImage
                            url="../images/frecciaD.jpg"
                            style="border:none; height: 71px; width: 90px; "
                            title="Prossima Pagina"/>
                    </f:facet>
                   
                </ice:dataPaginator>		
		</ice:portlet>	
		
		
	</h:form>
</h:body>
</html>
